<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BMixListView
 *
 * @author ID59C
 */
class BWInLineLayout extends CWidget {

    //put your code here
    //format or itemViews = array(array('view'=>$view,'data'=>$data))
    public $items = array();
    public $seperator = '<span style="padding-left:5px"></span>';
    public $htmlOptions = array('class' => 'b_mix_inline_view');

    public function init() {
        
    }

    public function run() {
        $this->renderContent();
    }

    public function renderContent() {
        echo CHtml::openTag('div', $this->htmlOptions) . "\n";
        $i = 0;
        $count = count($this->items);
        foreach ($this->items as $item) {
            $i++;
            $view = $item['view'];
            $data = $item['data'];
            $this->render($view, $data);
            if ($i < $count)
                echo $this->seperator;
        }
        echo "</div>\n";
    }

}

?>
